package com.it.blog.mapper;

import com.it.blog.domain.ArticleType;
import com.it.blog.query.ArticleTypeQuery;
import com.it.blog.vo.ArticleTypeVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface ArticleTypeMapper {
    /**
     * 查询全部
     * @return
     */
    @Select("select * from tb_article_type")
    List<ArticleType> findAll();
    @Select("select * from tb_article_type where id=#{id}")
    ArticleType findOne(Long id);
    List<ArticleType> queryPage(ArticleTypeQuery articleTypeQuery);
    void addArticleType(ArticleType articleType);
    void updateArticleType(ArticleType articleType);
    @Delete("delete from tb_article_type where id=#{id}")
    void deleteArticleType(Long id);
    void batchArticleTypes(Long[] ids);
    List<ArticleTypeVo> getArticleTypeStatistics();
}
